import request from '@/utils/request'

// 查询课题经费列表
export function listMyFunds(query) {
  return request({
    url: '/subject/funds/my',
    method: 'get',
    params: query
  })
}

// 查询课题经费列表
export function listFunds(query) {
  return request({
    url: '/subject/funds/list',
    method: 'get',
    params: query
  })
}

// 查询课题经费详细
export function getFunds(id) {
  return request({
    url: '/subject/funds/' + id,
    method: 'get'
  })
}

// 新增课题经费
export function addFunds(data) {
  return request({
    url: '/subject/funds',
    method: 'post',
    data: data
  })
}

// 修改课题经费
export function updateFunds(data) {
  return request({
    url: '/subject/funds',
    method: 'put',
    data: data
  })
}

// 删除课题经费
export function delFunds(id) {
  return request({
    url: '/subject/funds/' + id,
    method: 'delete'
  })
}

// 导出课题经费
export function exportFunds(query) {
  return request({
    url: '/subject/funds/export',
    method: 'get',
    params: query
  })
}